package com.geoserver.controller;

import com.geoserver.service.SensorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * FileName: SensorController
 * Create by fengzheng on 2019/4/28 22:35
 * Description: 传感器数据控制
 */

@Controller
public class SensorController {

    private SensorService sensorService;

    @Autowired
    public void setSensorService(SensorService sensorService) {
        this.sensorService = sensorService;
    }

    @PostMapping("/queryData")
    @ResponseBody
    public String queryData(int sn){
        return sensorService.queryData(sn);
    }
}
